﻿using DAL;
using Model;

namespace BLL
{
    public class AdminBll
    {
        AdminDal dal;
        public AdminBll(AdminDal dal)
        {
            this.dal = dal;
        }
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="admin"></param>
        /// <returns></returns>
        public int Adminadd(Admin admin)
        {
            try
            {
                return dal.Adminadd(admin);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public dynamic login(string username, string password)
        {
            try
            {
                var info = dal.login(username, password);
                return info;
                
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
